The present invention relates to a reversible coding method for coding color image digital data without deterioration, a reversible coding apparatus using this method, and a memory medium storing a program for controlling this apparatus.
Recently, when using medical data or image data in diagnosis, or when processing received image by edge enhancement or color correction and transmitting again, images of high quality are required, and there is an increasing need for reversible coding method which is an image coding method completely free from deterioration of image quality in still image or high definition image.
Herein, reversible coding of image data may be roughly composed of two processing blocks. A first block is an image data modeling portion, and a second block is an entropy coding portion. The image data modeling portion is intended to modify the image data into a data string easy to be coded, and the entropy coding portion is intended to assign the modified data string actually with a shortest possible code to create coded data.
Hitherto, such reversible coding method includes JPEG Loss-Less mode as the international standard coding method of still image, or JPEG-LS or JPEG2000 in the process of standardization. These coding methods are basically intended to determine the predictive error by predictive coding in the modeling portion of the image data, and processing the predictive error by Huffman coding or arithmetic coding in the entropy coding portion. Therefore, the key in enhancement of compression rate lies in how small the predictive error can be controlled in the image data modeling portion. Accordingly, in the image data modeling portion, it is attempted to enhance the prediction precision by using the context of the peripheral pixel information of the coded pixels and the like.
A general reversible coding method of color image digital data is described below. FIG. 22 is a structural diagram of a general reversible coding apparatus for RGB data. FIG. 23 is a diagram showing the flow of general processing of reversible coding of RGB data.
The flow of processing is explained by referring to FIG. 22 and FIG. 23. When RGB data is entered from input means 102, plane separating means 103 separates the RGB data into R plane data, G plane data, and B plane data (S201).
In the data of each separated plane, predictive coding means 104 predicts and codes in each plane (S202 to S204).
Further, context separating means 105 refers to the pixel values of the peripheral pixels of the pixels to be coded as shown in FIG. 24, and determines the context of the pixels to be coded (S205 to S207).
Entropy coding means 106 codes by entropy the predictive error data of R, G, B planes issued from the predictive coding means 104 in the condition optimally set in the context determined in the preceding steps S205 to S207 (S208 to S210).
Finally, thus coded data is issued from coded data output means 107.
These processes are controlled by the program stored in the control means 101.
In the conventional method, however, since the coding is operated independently in the plane unit, that is, in each plane, in the case of color image data having a correlation between planes, it is difficult to enhance the coding efficiency by using the correlation. Yet, such general reversible coding method is intended to determine the context by referring to the pixel values of the peripheral pixels of the pixels to be coded, therefore the number of states of the context increases, and the quantity of calculation and capacity of memory are enormous, or if the context is determined using quantized pixel values in order to decrease the number of states of the context, it is impossible to separate into groups of predictive errors by context with sufficient precision, and it is hence hard to realize the practical context separation in order to enhance the coding efficiency.
The invention is intended to solve these problems, and it is hence an object thereof to present a reversible coding method and a reversible coding apparatus in high in coding efficiency by realizing modification of predictive error for curtailing the quantity of data by using correlation between planes of values of pixels and/or predictive errors and practical context separation, and also to present a memory medium for storing the program for controlling such apparatus.
To solve the problems, the invention is intended to separate color image data into plural planes suited to coding, processing predictive coding of the data within plane or between planes in every plane, and to modify the predictive error data by using correlation between planes, and to process the modified predictive error data by entropy coding. In particular, when the input image is RGB data, the RGB data is separated into R plane, G plane and B plane, and by using the predictive error of G plane having a strong correlation with other plane, the data of predictive error of R plane and B plane is modified. According to the invention, the predictive error is separated into groups by the context, and entropy coding suited to each separated group is executed. In particular, this method is to determine the context by using the predictive error of coded peripheral pixels when separating by the context, and to separate the predictive error into groups by the context, and therefore the correlation between planes can be utilized sufficiently and a more practical context separation is realized, so that a reversible coding method of high coding efficiency is obtained.
The reversible coding apparatus of the invention comprises predictive coding means for processing predictive coding of color image data in every plane, predictive error modifying means for modifying the predictive error data by using correlation of predictive error between planes, and entropy coding means for coding by entropy the modified predictive error data. In particular, when the input image is RGB data, this apparatus comprises predictive error modifying means for modifying the predictive error of R plane and B plane by using the predictive error of G plane. The apparatus further comprises context separating means for separating the predictive error data by every context, and entropy coding means set optimally in every context, and especially by using the context separating means for separating the context by using the predictive error of coded peripheral pixels, the correlation between the planes can be utilized sufficiently, and more practicable context separation is realized.
Thus, the apparatus of the invention presents reversible coding of high speed and high coding efficiency.